IF  EXISTS (SELECT * FROM sys.objects WHERE object_id = OBJECT_ID(N'[dbo].[cms_sp_EntityMetaFieldAdd]') AND type in (N'P', N'PC'))
	DROP PROCEDURE [dbo].[cms_sp_EntityMetaFieldAdd]
GO
create procedure [dbo].[cms_sp_EntityMetaFieldAdd]
@Id int = null output,
@MetaFieldName nvarchar(250),
@MetaFieldDescription nvarchar(500) = null,
@IsSystem bit,
@MetaFieldType nvarchar(400)
as
insert into [dbo].[EntityMetaFields](
[MetaFieldName],
[MetaFieldDescription],
[IsSystem],
[MetaFieldType]
)
values(
@MetaFieldName,
@MetaFieldDescription,
@IsSystem,
@MetaFieldType
)
set @Id = SCOPE_IDENTITY()
return @Id


GO

